<template>
	<view class="home-container">
		<custom-nav title="首页"></custom-nav>
		<view class="content">
			<view class="router-item" @click="goSearch">
				<text class="title">查学校/专业</text>
				<text class="hint">择校专业指南</text>
			</view>
			<view class="router-item" @click="goAI">
				<text class="title">AI志愿填报</text>
				<text class="hint">AI志愿助手</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad() {

		},
		methods: {
			goSearch(){
				uni.switchTab({
					url: '/pages/search/index'
				});
			},
			goAI(){
				uni.switchTab({
					url: '/pages/ai/index'
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 0 80rpx;
		margin: 20% auto;
	}
	.router-item{
		width: 100%;
		height: 220rpx;
		border-radius: 10rpx;
		margin: 25rpx 0;
		display: flex;
		flex-direction: column;
		padding: 60rpx;
	}
	.router-item:first-child{
		background-color: #5F99FD;
		background-image: url(/schoolCube/static/img/router1.png);
		background-size: 152rpx 152rpx;
		background-repeat: no-repeat;
		background-position: right bottom;
	}
	.router-item:last-child{
		background-color: #8fe082;
		background-image: url(/schoolCube/static/img/router2.png);
		background-size: 152rpx 152rpx;
		background-repeat: no-repeat;
		background-position: right bottom;
	}
	.title{
		color: #FFFFFF;
		font-size: 36rpx;
	}
	.hint{
		color: #FFFFFF;
		font-size: 28rpx;
	}
</style>
